__author__ = 'Lenka'

from selenium.webdriver.common.by import By

from php4dvd.pages.page import Page


class InternalPage(Page):
    """
    This is a common description of an internal page.
    """
    @property
    def logout_button(self):
        return self.driver.find_element(By.LINK_TEXT, 'Log out')

    @property
    def user_profile_link(self):
        return self.driver.find_element(By.LINK_TEXT, 'My profile')

    @property
    def is_this_page(self):
        return self.is_element_visible((By.CSS_SELECTOR, "nav"))

